package dse.modules;

import dse.Network;
import dse.Node;

/**
 * This module is responsible for calculating the communication cost between two
 * nodes.
 *  
 * @author Sam
 */
public interface CommunicationCostCalculator extends Module {
	/**
	 * Calculate the cost in time (seconds) to send a data object of the 
	 * given size between the two nodes.
	 * 
	 * @param network	
	 * @param from	Source node.
	 * @param to	Destination node.
	 * @param size	Size in bytes.
	 * 
	 * @return		The time it will take to send a data object of the given 
	 *				size between the two nodes in seconds.	
	 */
	double cost (Network network, Node from, Node to, long size);
	
	/**
	 * Returns the distance between the two nodes (in miles?).
	 * 
	 * @param network
	 * @param from	Source node.
	 * @param to	Destination node.
	 * @param size	Size in bytes.
	 * @return		The distance between the two nodes.	
	 */
	double distance (Network network, Node from, Node to);
}
